package ar.edu.itba.it.cg.grupo01.game.action;

import ar.edu.itba.it.cg.grupo01.state.GameStateType;
import ar.edu.itba.it.cg.grupo01.state.MyGameState;
import ar.edu.itba.it.cg.grupo01.state.PlayState;
import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;

public class MenuAction extends InputAction {

    private MyGameState playState;

    public MenuAction(MyGameState playState) {

        this.playState = playState;
    }

    public void performAction(InputActionEvent inputActionEvent) {

        System.out.println("playState = " + playState);
        ((PlayState) playState).setLastState(GameStateType.MENU);
    }
}